<template>
  <div class="item" @click="toStore">
    <img src="../../../assets/11.jpg" alt="">
    <div class="item_right">
      <div class="title">{{item.title}}</div>
      <div class="sales">{{item.sales}}</div>
      <div class="price">起送费 ¥{{item.price}}</div>
      <div class="label">
        <div v-for="(item, index) in item.label" :key="index">{{item}}</div>
      </div>
    </div>
  </div>
</template>

<script>

import {useRouter} from "vue-router";

export default {
  name: "StoreItem",
  props:['item'],
  setup(){
    let router = useRouter();
    const toStore = ()=> {
      router.push('../myStore')
    }

    return{
      toStore
    }
  }
}
</script>

<style lang="less" scoped>
    .item:nth-child(1){
        margin-top: 10px;

    }
    .item{
      background-color: #fff;
      border-radius: 30px;
      display: flex;
      padding: 10px;
      img{
        width: 300px;
        height: 200px;
        border-radius: 10px;
        margin-right: 20px;
      }
      .item_right{
        display: flex;
        flex-flow: column;
        justify-content: space-between;
        .title{
          font-size: 30px;
          font-weight: 600;
        }
        .sales{
          font-size: 30px;
          font-weight: 600;
        }
        .price{
          font-size: 20px;
          font-weight: 600;
        }
        .label{
          display: flex;
          div{
            background-color: #ffc400;
            font-size: 20px;
            padding: 5px 10px;
            margin-right: 10px;
            border-radius: 5px;
            font-weight: 600;
          }
        }
      }
    }
</style>